Skip to main content

Create manifest

The manifest (referred to as an 'instance') is a container for a set of delivery instructions and their respective attributes. Each manifest instance contains one or more delivery objects, referred to as 'shipments'.

In this example we will start with a basic 'manifest instance' and a single 'shipment'. More complex delivery options are provided in subsequent examples.

Note on CARRIER_ID

The CARRIER_ID is a unique identifier for your carrier account. It is provided to you by Peddler.

Create a manifest instance

In order to create a manifest instance, you will need to make a POST request to the following endpoint:

/api/Carriers/[CARRIER_ID]/createShipments

The request body should contain a JSON encoded array of objects where each object corresponds to a shipment with the following properties:

https://alphadev-api.peddler.com/
ParameterTypeFormatDescription
metaDataREQUIREDstringA unique ID for you to identify the individual shipment and to avoid duplication of shipments within our system
senderAddressOPTIONALobjectAddress object containing sender details pertaining to delivery
deliveryAddressREQUIREDobjectAddress object containing consignee details pertaining to delivery
deliveryAddress.companyOPTIONALstringInclude the company name
deliveryAddress.nameRECOMMENDEDstringInclude the consignee name
deliveryAddress.houseRECOMMENDEDstringInclude the house number unless included in address1 field
deliveryAddress.address1REQUIREDstringInclude street and house number unless house number is included in house field
deliveryAddress.address2RECOMMENDEDstringInclude any additional address information
deliveryAddress.cityREQUIREDstringA valid city name
deliveryAddress.stateRECOMMENDEDstringState name
deliveryAddress.postCodeREQUIREDstringIf your country code is NL, you provide a valid Dutch 6PP postcode (PREFERRED) or 4PP postcode.
6PP postcode example: 1066EP
4PP postcode example: 1066
deliveryAddress.countryREQUIREDstringISO 3166-1 alpha-2 country code DEFAULT: NL
deliveryAddress.phoneRECOMMENDEDnumericCustomer mobile in E.164 format for SMS delivery notifications
deliveryEmailRECOMMENDEDstringEmail address for inflight options and delivery notifications
deliveryShippingTypeRECOMMENDEDstringPACKAGE (DEFAULT) [higher rate], LETTERBOX [lower rate]
deliveryContentsTypeRECOMMENDEDstringPossible values: GOODS (DEFAULT) FOOD, ALCOHOL, BOOKS or ADR
shippingValueRECOMMENDEDnumericValue of goods in shipment
shippingValueCurrencyRECOMMENDEDstringISO 4217 currency code
bundleIdRECOMMENDEDstringA unique ID (if applicable) for the big box freight in case shipments are bundled together in a big box.
colliMasterIdRECOMMENDEDstringA unique ID (if applicable) for the colli which will be used to identify all packages (all collo) constituting the colli.
colliCountRECOMMENDEDnumericNumber of packages (collo) constituting the colli.
dimensionsRECOMMENDEDstringDimensions of the shipment.
Example: 38.5cm * 35.5cm * 9.0cm
weightRECOMMENDEDnumericWeight of the shipment
weightUnitRECOMMENDEDstringPossible values: KG (DEFAULT), LB
returnTypeRECOMMENDEDstringPossible values: RETURN_TO_SENDER, RETURN_AND_DESTROY, RETURN_AND_DONATE
estimatedInjectionDateRECOMMENDEDstringJSON DATE ISO 8601 2023-07-10T15:43:24.133Z estimation when the shipment will be injected to destination distribution hub
carrierOptionsRECOMMENDEDobject array
 [
//Only when signature is required.
//SURCHARGE maybe applicable
{
"key": "POD",
"value": "SIGNATURE"
},
//Required when shipping ADR goods
{
"key": "ADR",
"value": "Description of ADR contents"
},
//Required when OTP check is necessary for delivery
//SURCHARGE maybe applicable
{
"key": "OTP",
"value": "TRUE"
}
]
webhookUriRECOMMENDEDstringURI to receive webhook notifications. Each webhook can be unique to the shipment.
Example: https://peddl.free.beeceptor.com/webhook/metadata
serviceLevelRECOMMENDEDstringPossible values: NEXT_DAY_48 (DEFAULT), NEXT_DAY_60, SAME_DAY_24, SAME_DAY_SAT_24, SAME_DAY_SUN_24, EXPRESS_0900, EXPRESS_1030, EXPRESS_1200, EXPRESS_1700, EXPRESS_1800, EXPRESS_2200, EXPRESS_SAT, EXPRESS_SUN, INSTANT_02
Note on carrierOptions

ADR

This requires additional description in carrierOptions

OTP

  • It is a 4-digit code sent to the consignee's email/mobile number for delivery verification.
  • The value TRUE in the carrierOptions array is a string and not a boolean.

Mock delivery shipment request

Blank fields

Any fields that are blank should NOT be included in the payload.

curl --location --globoff 'https://alphadev-api.peddler.com/api/Carriers/[CARRIER_ID]/createShipments' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer nFzmOyturnztDiQT1gpijrgYczz2mBNW' \
--data-raw '[
{
"metaData": "UNIQUE_SENDER_REFERENCE_1",
"deliveryAddress": {
"name": "Peddler BV",
"house": "12-46",
"address1": "John M. Keynesplein",
"address2": "B-toren, L.0.K.4",
"city": "Amsterdam",
"state": "Noord Holland",
"postCode": "1066 EP",
"country": "NL",
"phone": "+31623754473"
},
"deliveryEmail": "[email protected]",
"deliveryShippingType": "LETTERBOX",
"deliveryContentsType": "GOODS",
"shippingValue": 10,
"shippingValueCurrency": "EUR",
"dimensions": "38.5cm * 35.5cm * 9.0cm",
"weight": "10",
"weightUnit": "KG",
"estimatedInjectionDate": "2023-07-10T15:43:24.133Z",
"carrierOptions": [
{
"key": "POD",
"value": "SIGNATURE"
},
{
"key": "ADR",
"value": "Description of ADR contents of package"
}
],
"webhookUri": "https://carrierwebsite.com/api/webhooks",
"serviceLevel": "NEXT_DAY_48"
}
]'
Minimum required fields

A shipment can be created with the minimum required fields, however, we recommend including as much information as possible to ensure a smooth delivery experience.

An example of a minimum required shipment is shown below:

minimumRequiredShipment.js
const mockedDeliveryshipment = [
{
"metaData": "UNIQUE_SENDER_REFERENCE_2",
"deliveryAddress": {
"address1": "John M. Keynesplein 12",
"city": "Amsterdam",
"postCode": "1066 EP",
"country": "NL"
}
}
]

fetch('https://api-lokl.peddler.com/api/Carriers/CARRIER_ID/createShipments', {
method: 'POST',
headers: {
'Authorization': `Bearer ${access_token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify(mockedDeliveryshipment)
})
.then(response => response.json())
.then(data => {
console.log(data);
})
.catch(error => {
console.error(error);
});

Mock delivery shipment response

  • Any validation errors would result in a 422 HTTP status code response, and validation errors in the response
  • The most common validation error is utilising a postcode not in our catchment area (we will provide a postcode validation example below)
mockedDeliveryshipmentResponse.json
[
{
"id": "XXXXXX1",
"trackingNumber": "PDXXXXXXXXX1",
"metaData": "UNIQUE_SENDER_REFERENCE_1",
"status": "ADDED",
"details": {
"deliveryAddress": {
"name": "Peddler BV",
"house": "12-46",
"address1": "John M. Keynesplein",
"address2": "B-toren, L.0.K.4",
"city": "Amsterdam",
"state": "Noord Holland",
"postCode": "1066 EP",
"country": "NL",
"phone": "+31623754473"
},
"deliveryEmail": "[email protected]",
"deliveryShippingType": "LETTERBOX",
"deliveryContentsType": "GOODS",
"shippingValue": 10,
"shippingValueCurrency": "EUR",
"dimensions": "38.5cm * 35.5cm * 9.0cm",
"weight": "10",
"weightUnit": "KG",
"estimatedInjectionDate": "2023-07-10T15:43:24.133Z",
"carrierOptions": [{
"key": "POD",
"value": "SIGNATURE"
},
{
"key": "ADR",
"value": "Description of ADR contents of package"
}
],
"webhookUri": "https://carrierwebsite.com/api/webhooks",
"serviceLevel": "NEXT_DAY_48"
}
},
{
"id": "XXXXXX2",
"trackingNumber": "PDXXXXXXXXX2",
"metaData": "UNIQUE_SENDER_REFERENCE_2",
"status": "ADDED",
"details": {
"deliveryAddress": {
"name": "Peddler BV",
"house": "12-46",
"address1": "John M. Keynesplein",
"address2": "B-toren, L.0.K.4",
"city": "Amsterdam",
"state": "Noord Holland",
"postCode": "1066 EP",
"country": "NL",
"phone": "+31623754473"
},
"deliveryEmail": "[email protected]",
"deliveryShippingType": "LETTERBOX",
"deliveryContentsType": "GOODS",
"shippingValue": 10,
"shippingValueCurrency": "EUR",
"dimensions": "38.5cm * 35.5cm * 9.0cm",
"weight": "10",
"weightUnit": "KG",
"estimatedInjectionDate": "2023-07-10T15:43:24.133Z",
"carrierOptions": [{
"key": "POD",
"value": "SIGNATURE"
},
{
"key": "ADR",
"value": "Description of ADR contents of package"
}
],
"webhookUri": "https://carrierwebsite.com/api/webhooks",
"serviceLevel": "NEXT_DAY_48"
}
},
{
"metaData": "UNIQUE_SENDER_REFERENCE_3",
"status": "ERROR",
"errorType": "INVALID_ADDRESS",
"error": "Error: Address invalid [\"postcode missing\"]"
},
{
"metaData": "UNIQUE_SENDER_REFERENCE_4",
"status": "ERROR",
"errorType": "INVALID_POSTCODE",
"error": "Error: Postcode not available for delivery [\"postcode\"]"
},
{
"metaData": "UNIQUE_SENDER_REFERENCE_5",
"status": "ERROR",
"errorType": "INVALID_FIELDS",
"error": "Error: Required fields missing [\"metaData\"]"
},
{
"metaData": "UNIQUE_SENDER_REFERENCE_6",
"status": "ERROR",
"errorType": "OTHER",
"error": "Error: Duplicate meta data"
}
]